package com.fengke.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class ContextManager {
	private static ApplicationContext context;

	public static ApplicationContext getContext() {
		if (context == null) {
			context = new FileSystemXmlApplicationContext(new String[] {
					"dataAccessContext-local.xml",
					"applicationContext-properties.xml" });
		}
		return context;
	}

	/**
	 * @param context
	 *            the context to set
	 */
	public static void setContext(ApplicationContext context) {
		ContextManager.context = context;
	}
}
